<%@ include file="/WEB-INF/pages/include/header.jspfrag"%>
<%@ include file="/WEB-INF/pages/error.jsp"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>


<h:form>
	<h:panelGrid columns="2">
		<h:outputLabel value="Country:"></h:outputLabel>
		<h:selectOneMenu value="#{locale.selectedCountry}" onchange="submit()"
			valueChangeListener="#{locale.countryChanged}">
			<f:selectItems value="#{locale.countryList}" />
		</h:selectOneMenu>
		<h:outputLabel value="City:"></h:outputLabel>
		<h:selectOneMenu value="#{locale.selectedCity}">
			<f:selectItems value="#{locale.cities}" />
		</h:selectOneMenu>
	</h:panelGrid>
</h:form>





<form:form action="/create/user.do" commandName="registrationForm"
	id="registrationForm" method="post" autocomplete="off" name="form">
	<table>
		<tr>
			<td><form:label path="email">
					<sup>*</sup>Email:</form:label></td>
			<td><form:input path="email" /></td>
			<td><form:errors path="email" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="emailConfirmation">
					<sup>*</sup>Confirm email:</form:label></td>
			<td><form:input path="emailConfirmation" /></td>
			<td><form:errors path="emailConfirmation" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="password">
					<sup>*</sup>Password:</form:label></td>
			<td><form:password path="password" /></td>
			<td><form:errors path="password" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="passwordConfirmation">
					<sup>*</sup>Confirm password:</form:label></td>
			<td><form:password path="passwordConfirmation" /></td>
			<td><form:errors path="passwordConfirmation" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="name">
					<sup>*</sup>Name:</form:label></td>
			<td><form:input path="name" /></td>
			<td><form:errors path="name" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="surname">Surname:</form:label></td>
			<td><form:input path="surname" /></td>
			<td><form:errors path="surname" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="dateOfBirth">Date of birth:</form:label></td>
			<td><form:input path="dateOfBirth" maxlength="10"
					alt="dd/mm/yyyy e.g. 03/04/1987" /></td>
			<td><form:errors path="dateOfBirth" cssClass="error" /></td>
		</tr>

		<jsp:useBean id="values"
			class="com.elbis.business.manager.ManageDefaultValuesList"
			scope="session" />

		<tr>
			<td><form:label path="country">Country:</form:label></td>
			<td><form:select path="country" id="country"
					items="${values.countryList}" itemValue="code" itemLabel="name" /></td>
			<td><form:errors path="country" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="city">City:</form:label></td>
			<td><form:select path="city" id="city" items="${country.cities}"
					itemValue="name" itemLabel="name" /></td>
			<td><form:errors path="city" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="language">Language:</form:label></td>
			<td><form:select path="language" id="language"
					items="${values.languageList}" itemValue="code" itemLabel="name" /></td>
			<td><form:errors path="country" cssClass="error" /></td>
		</tr>
		<tr>
			<td><form:label path="nationality">Nationality:</form:label></td>
			<td><form:input path="nationality" /></td>
			<td><form:errors path="nationality" cssClass="error" /></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
			<td align="right"><button type="submit">Create</button></td>
		</tr>
	</table>
</form:form>


<%@ include file="/WEB-INF/pages/include/footer.jspfrag"%>